package com.ccc.boot.security.pojo;

import java.io.Serializable;
import java.util.Date;

/**
 * JWT载荷封装对象
 *  将token中载荷部分单独封装成一个对象
 *
 * @author superC
 * @date 2022/3/23
 * @version 0.1.0
 */
public class Payload<T> implements Serializable {
    private static final long serialVersionUID = 8568170550886329047L;

    /**
     * token唯一标识id
     */
    private String id;

    /**
     * 用户信息
     */
    private T userInfo;

    /**
     * 过期时间
     */
    private Date expiration;

    /*  ********* getter/setter *********** */

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public T getUserInfo() {
        return userInfo;
    }

    public void setUserInfo(T userInfo) {
        this.userInfo = userInfo;
    }

    public Date getExpiration() {
        return expiration;
    }

    public void setExpiration(Date expiration) {
        this.expiration = expiration;
    }
}